<html>
<head>
    <title>透析助手</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.5.6/css/sm.min.css">
    <link rel="stylesheet" href="__PUBLIC__/css/swiper.css">
    <link rel="stylesheet" href="__PUBLIC__/css/style.css">
    <link rel="stylesheet" href="__PUBLIC__/css/5s.css">
    <link rel="stylesheet" href="__PUBLIC__/css/6m.css">
    <link rel="stylesheet" href="__PUBLIC__/css/iconfont.css">
</head>
<body>
    <div class="Popwindow" style="display:block">
        <div class="DinnerTime WeightBlock">
            <div class="DinnerTime-title">
                记录体重
            </div>
            <div class="WeightList">
                <div class="WeightTimes">
                    <foreach name="list" key="k" item="v">
                        <div>第<{$k+1}>次：<{$v.vol}></div>
                    </foreach>
                </div>
                <div class="weight-time">
                    <{$now_date}>
                    <br>
                    第<{$current_times}>次记录
                </div>
                <div class="bg-weight"></div>
                <div class="Weight-num-line"></div>
                <div class="Weight-num"><span>45</span>kg</div>
                <div class="WeightChart">
                    <div class="swiper-container-another">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide">
                                <div class="Full"></div>
                                <span>30</span>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div class="Full"></div>
                                <span>31</span>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div class="Full"></div>
                                <span>32</span>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div class="Full"></div>
                                <span>33</span>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div class="Full"></div>
                                <span>34</span>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div class="Full"></div>
                                <span>35</span>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            <div class="swiper-slide">
                                <div></div>
                            </div>
                            
                            
                        </div>
                    </div>
                </div>

            </div>
            <div class="BtnGroup Btn-Popwindow btn-drink">
                <button class="btn-drop" type="button" onclick="javascript:history.go(-1);">取消</button>
                <button class="btn-submit" type="button" onclick="saveWeight()">确定</button>
            </div>
        </div>
    </div>
<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.5.7/js/sm.min.js' charset='utf-8'></script>
<script type='text/javascript' src='__PUBLIC__/js/swiper.min.js'></script>
<script type='text/javascript' src='__PUBLIC__/js/myjq.js'></script>
<script>
    var j,htmlStr = '';
    for(var i=36;i<100;i++){
        htmlStr += '<div class="swiper-slide"><div class="Full"></div><span>'+i+'</span></div>';
        j=0;
        for(j=0;j<9;j++){
            htmlStr += '<div class="swiper-slide"><div></div></div>';
        }
    }
    $('.swiper-wrapper').append(htmlStr);
    
    var weight;
    var mySwiper = new Swiper('.swiper-container-another', {
        direction : 'vertical',
        slidesPerView : 'auto',
        spaceBetween : 3,
        freeMode : true,
        freeModeSticky : true,
        onSlideChangeEnd : function(swiper) {
            Weight = (mySwiper.activeIndex) / 10 + 32;
            $(".Weight-num span").text(Weight);
        },
        onReachBeginning : function(swiper) {
            $(".Weight-num span").text(32);
        },
        onReachEnd : function(swiper) {
            $(".Weight-num span").text(98);
        },
        onTouchMove : function(swiper) {
            Weight = (mySwiper.activeIndex) / 10 + 32;
            $(".Weight-num span").text(Weight);
        }
    })
    mySwiper.slideTo(130, 500, false);
	$(".Weight-num span").text(45);
    //保存体重
    function saveWeight(){
        loadingShow();
        $.post("<{:U('edit')}>",{vol:$(".Weight-num span").text()},function(res){
            if(res == 'suc'){
                $.toast('记录成功');
                setTimeout("location.href='<{:U('index')}>'",1200);
            }else if(res == 'over'){
                $.toast('每日只能记录3次体重');
                setTimeout("location.href='<{:U('index')}>'",1200);
            }else{
                loadingHide();
                $.toast('记录失败');
            }
        },'json');
    }
</script>
</body>
</html>